$(document).ready(function(){
  var mySwiper = new Swiper ('.swiper-container', {
    loop: true,
    slidesPerView: 3,
    loopFillGroupWithBlank: true,
    spaceBetween: 10,
    slidesPerGroup: 1,  
    autoplay: {
      delay: 2500,
      disableOnInteraction: false,
    },  
    // 如果需要分页器
    pagination: '.swiper-pagination',
    
    // 如果需要前进后退按钮
      pagination: {
        el: '.swiper-pagination',
        clickable: true,
      },
      navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev',
      },
    
    // 如果需要滚动条
    scrollbar: '.swiper-scrollbar',
  }) 
  $('.s-info a').on('click',function(){
    $('body').animate({scrollTop:700})
  })
  $('.form button').on('click',function(){
    let name=$('.form-left .li').eq(0).find('input').val();
    let email=$('.form-left .li').eq(1).find('input').val();
    let phone=$('.form-left .li').eq(2).find('input').val();
    let content=$('.form-right textarea').val();
    var url='http://180.97.15.173:8081/xyssoManager/sendEmail/sendEmail?name='+name+'&email='+email+'&phone='+phone+'&content='+content;
    if(name=="" || email=="" || phone=="" || content==""){
      alert("填写数据不完整");
      return
    }
    $.ajax({
      type:"POST",
      url:encodeURI(url),
      //url:'http://http://192.168.30.18:8080/xyssoManager/sendEmail/sendEmail?name=1&email=472171570@qq.com&phone=13113894646&content=2212322',
      dataType: 'JSONP',
      success:function(data){
        alert("发送成功")
      },
    })
    alert("发送成功")
  })
})

$(window).scroll(function(){
  let stop=parseFloat($(window).scrollTop());
  if(stop>200){
    $('.header-fixed').show()
  }else{
    $('.header-fixed').hide()
  }
})
